from django.db import models
from django.utils import timezone


class CallBackLog(models.Model):
    url = models.CharField(max_length=256, blank=True, null=True, verbose_name="回调链接")
    content = models.TextField(blank=True, null=True, verbose_name="请求内容")
    response_result = models.TextField(blank=True, null=True, verbose_name="返回结果")
    request_type = models.CharField(max_length=8, verbose_name="请求类型", blank=True, null=True)
    create_time = models.DateTimeField(default=timezone.now, verbose_name="创建时间")
    function_name = models.CharField(max_length=32, verbose_name="调用方法", blank=True, null=True)

    class Meta:
        verbose_name = "回调日志"
        verbose_name_plural = verbose_name
